package com.study.zzedu.ui.modifypwd;

import android.content.Context;

import com.study.zzedu.base.BasePresenter;
import com.study.zzedu.base.BaseView;
import com.study.zzedu.http.OnResultListener;

public class ModifyPwdPresenter extends BasePresenter<BaseView> {

    private ModifyPwdModel mModel;

    public ModifyPwdPresenter() {
        this.mModel = new ModifyPwdModel();
    }

    public void modify(Context context,String oldPwd, String pwd) {
        mModel.modify(context, oldPwd, pwd, new OnResultListener() {
            @Override
            public void onSuccess(String result) {
                getView().getData(result);
            }

            @Override
            public void onError(String error) {
                getView().showError(error);
            }
        });
    }
}
